#include <iostream>
#include <string>
#include <cctype>
using namespace std;
void example_p77();
void example_p77_2();
void example_p78();
void example_p78_2();
void example_p81();
void practice_3_2();
void practice_3_4a();
void practice_3_4b();
void practice_3_5();
void practice_3_6();
void practice_3_7();
void practice_3_8();
void practice_3_10();
int main()
{
	//example_p77();
	//example_p78();
	//example_p77_2();
	//example_p78_2();
	//practice_3_2();
	//practice_3_41();
	//practice_3_4b();
	//practice_3_5();
	//practice_3_6();
	//practice_3_7();
	//practice_3_8();
	//practice_3_10();
	return 0;
}
void example_p77()
{
	string s;
	char c;
	getline(cin,s);
	c=s[2];
	cout<<c;
}
void example_p78()
{
	string word;
	while(cin >> word)
		cout<<word<<endl;
}
void example_p77_2()
{
	string s("value");
	cout<<s.size()<<endl;
}
void example_p78_2()
{
	string line;
	while(getline(cin,line))
		cout<<line<<" "<<line.size()<<endl;
}
void example_p81()
{
	string s5="hello"+",";
}
void practice_3_2()
{
	string word;
	while(cin>>word)
		cout<<word<<endl;
}
void practice_3_4a()
{
	string s,s1;
	cin>>s>>s1;
	if(s==s1)
		cout<<"equals"<<endl;
	else
	{
		string output=(s>s1)?s:s1;
		cout<<output<<endl;
	}
}
void practice_3_4b()
{
	string s,s1;
	cin>>s>>s1;
	if(s.size()==s1.size())
		cout<<"equals"<<endl;
	else
	{
		string output=(s.size()>s1.size())?s:s1;
		cout<<output<<endl;
	}
}
void practice_3_5()
{
	string sum;
	string word;
	while(cin>>word){
		sum=sum+word+" ";
	}
	cout<<sum<<endl;
}
void practice_3_6()
{
	string str("simple string");
	for(auto &c:str)c='X';
	cout<<str<<endl;
}
void practice_3_7()
{
	string str("simple string");
	for(char c:str)c='X';
	cout<<str<<endl;
}
void practice_3_8()
{
	string str("simple string");
	string str1=str;
	decltype(str.size()) i=0;
	while(i<str.size())
	{
		auto &c=str[i++];
		c='X';
	}
	cout<<str<<endl;
	for(decltype(str1.size()) i=0;i<str1.size();++i)
	{
		auto &c=str1[i];
		c='X';
	}
	cout<<str1<<endl;
}
void practice_3_10()
{
	string str("h,hee,.o worl.!d");
	string output="";
	for(auto c:str)
	{
		if(!ispunct(c))
		{
			string tmp(1,c);
			output+=tmp;
		}
	}
	cout<<output<<endl;
}